<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--子孙后代选择器-->
    <style>
        /*body div div p {color: red}*/
        /*body div div div p {color: blue}*/
        body > div > div > div > p {
            color: red
        }

        a:link {
            color: red
        }

        a:visited {
            color: green
        }

        a:hover {
            color: blue
        }

        a:active {
            color: yellow
        }
    </style>

</head>
<body>
<a href="http://www.qq.com">qq官网</a>
<a href="http://www.youku.com">优酷官网</a>
<a href="http://www.58.com">58同城官网</a>
<p>p1</p>
<div>
    <p>p2</p>
    <div><p>p3</p></div>
    <div>
        <p>p4</p>
        <div><p>p5</p></div>
    </div>
</div>
</body>
</html>